<div id="content_header">
  <h3>Courses Fee</h3>
</div>

<div class="row">
  <div class="col-xs-12 col-sm-12 col-md-12 col-lg-3 col-lg-push-9">
    <button type="button" class="btn btn-large btn-block btn-primary" ng-click="save()">Save all</button>
  </div>
  <div class="col-xs-12 col-sm-12 col-md-12 col-lg-9 col-lg-pull-3">
    <table class="table table-bordered">
      <thead>
        <tr>
          <!-- <th class="text-center">Course Types</th> -->
          <th class="text-center">#</th>
          <th class="text-center" style="min-width: 200px">Levels</th>
          <th class="text-center" ng-repeat="TeacherType in TeacherTypes">{{ TeacherType.Code }}</th>
        </tr>
      </thead>
      <tbody>
        <tr ng-repeat="(key,course) in courses">
          <td> {{ $index + 1 }} </td>
          <th> {{ key }} </th>
          <td>
            <div class="input-group" ng-if="isUsing(course, 0)">
              <input type="text" class="form-control" ng-model="fees[courseId(course, 0)].Fee">
              <select class="form-control" ng-model="fees[courseId(course, 0)].Currency.Id" ng-options="currency.Id as currency.Code for currency in currencies">
                <option value="" ng-hide="fees[courseId(course, 0)].Currency.Id"></option>
              </select>
            </div>
          </td>
          <td>
            <div class="input-group" ng-if="isUsing(course, 1)">
              <input type="text" class="form-control" ng-model="fees[courseId(course, 1)].Fee">
              <select class="form-control" ng-model="fees[courseId(course, 1)].Currency.Id" ng-options="currency.Id as currency.Code for currency in currencies">
                <option value="" ng-hide="fees[courseId(course, 1)].Currency.Id"></option>
              </select>
            </div>
          </td>
          <td>
            <div class="input-group" ng-if="isUsing(course, 2)">
              <input type="text" class="form-control" ng-model="fees[courseId(course, 2)].Fee">
              <select class="form-control" ng-model="fees[courseId(course, 2)].Currency.Id" ng-options="currency.Id as currency.Code for currency in currencies">
                <option value="" ng-hide="fees[courseId(course, 2)].Currency.Id"></option>
              </select>
            </div>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</div>